﻿Public Class StammdatenverwaltungMenuAdapter
    Inherits FormAdapter(Of frmStammdatenMenu, StammdatenverwaltungMenuListener)

    Public Sub New()
        MyBase.New(New frmStammdatenMenu)
    End Sub

    Private WithEvents btnMitarbeiter As Button = form.btnMitarbeiter
    Private WithEvents btnKunde As Button = form.btnKunde
    Private WithEvents btnProjekte As Button = form.btnProjekte
    Private WithEvents btnTasks As Button = form.btnTasks

    Private Sub btnMitarbeiter_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnMitarbeiter.Click
        For Each listener As StammdatenverwaltungMenuListener In getObservable().getListeners
            listener.mitarbeiterPerformed()
        Next
    End Sub

    Private Sub btnKunde_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnKunde.Click
        For Each listener As StammdatenverwaltungMenuListener In getObservable().getListeners
            listener.kundePerformed()
        Next
    End Sub

    Private Sub btnProjekte_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnProjekte.Click
        For Each listener As StammdatenverwaltungMenuListener In getObservable().getListeners
            listener.projektePerformed()
        Next
    End Sub

    Private Sub btnTasks_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTasks.Click
        For Each listener As StammdatenverwaltungMenuListener In getObservable().getListeners
            listener.tasksPerformed()
        Next
    End Sub
End Class
